Task   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 20
dl 0
loc 23
c 0
b 0
f 0
rs 10

3 Functions

Rating   Name   Duplication   Size   Complexity  
A updateName 0 3 1
A getName 0 3 1
A getId 0 3 1
1
import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
2
3
@Entity()
4
export class Task {
5
  @PrimaryGeneratedColumn('uuid')
6
  private id: string;
7
8
  @Column({ type: 'varchar', nullable: false })
9
  private name: string;
10
11
  constructor(name: string) {
12
    this.name = name;
13
  }
14
15
  public getId(): string {
16
    return this.id;
17
  }
18
19
  public getName(): string {
20
    return this.name;
21
  }
22
23
  public updateName(name: string): void {
24
    this.name = name;
25
  }
26
}
27